﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using UncleBobWebService.Database;

namespace UncleBobApplicantWebService.Controllers
{
    public class QuestionsMenuController : Controller
    {
        //
        // GET: /QuestionsMenu/

        public ActionResult QuestionsMenu()
        {
            return View();
        }

        public ActionResult FormAction(FormCollection collection)
        {
            if (collection.Get("createquestion") != null)
            {
                return RedirectToAction("JobQuestionsEnter", "JobQuestions");   
            }

            if (collection.Get("editquestion") != null)
            {
                return RedirectToAction("JobListQuestionsView", "JobListQuestions");
            }

            if (string.Compare(Session[SessionKeys.ACCESSLEVEL].ToString(), PermissionTypes.User.HiringManager.ToString()) == 0)
            {
                return RedirectToAction("MainMenu", "HMMainMenu");
            }

            return RedirectToAction("StaffingExpertMainMenu", "StaffingExpertMenu");
        }
    }
}
